import sun.security.provider.Sun;

public class Test {
    public static void main(String[] args) {
        Father f1 = new Sun1("老大") ;
        if(f1 instanceof Sun1){
            Sun1 t1 = (Sun1) f1 ;
            t1.fly();
        }else {
            System.out.println("不会飞");
        }



    }
}
class Father{
    String name ;
   Father(String name){
       this.name = name ;
   }
}
class Sun1 extends Father{
    public void fly (){
        System.out.println(this.name + "起飞");
    }
    Sun1(String name){
        super(name);
    }
    }
class Sun2 extends Father{
    Sun2(String name){
        super(name);
    }
public void win(){
    System.out.println(this.name + "下水");
}
}